package com.gnerv.battle.boot.module.base.service;

import com.gnerv.battle.boot.module.base.model.bo.NoticeBO;
import com.gnerv.battle.boot.module.base.model.dto.NoticeDTO;
import lombok.NonNull;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
* @author Gnerv LiGen
*/
public interface NoticeService {

    boolean create(@NonNull NoticeBO noticeBO);

    boolean deleteByUkId(@NonNull String ukId);

    boolean updateByUkId(@NonNull NoticeBO noticeBO);

    NoticeDTO selectByUkId(@NonNull String ukId);

    List<NoticeDTO> listByTitle(String title, Integer page, Integer size);

    @Transactional(readOnly = true)
    List<NoticeDTO> listByAccountUkId(String accountUkId, Integer page, Integer size);

    @Transactional(readOnly = true)
    List<NoticeDTO> listReceive(String accountUkId, String status, Integer page, Integer size);

    int countByTitle(String title);

    int countByAccountUkId(String accountUkId);

    int countReceive(String accountUkId, String status);

    boolean send(String noticeUkId, List<String> accountUkIdList);

    NoticeDTO selectReceiveByAccountUkIdAndNoticeUkId(String accountUkId, String noticeUkId);
}
